<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>部门管理</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<script>document.write('<script src="../../plugin/vue/js/import.js?' + Math.random() + '"><' + '/script>');</script>

<script>
	_import("../../plugin/vue/js/before.js");
</script>
<style>
[v-cloak] {
	display:none !important;
}
</style>
</head>
<body>
	<div class="w-h100" id="app" v-cloak> <!--  v-cloak -->
	 	 <div class="left_side" v-if="show_bar">
	           <div class="panel panel-default">
					<div class="panel-heading" id="panel-heading-div">
							<h3 class="panel-title">
								<i class="icon-user"></i>部门结构
							</h3>
					</div>
					<div class="panel-body w-jheight">
						<!--  
						<el-input
						  placeholder="输入关键字进行过滤"
						  v-model="filterText">
						</el-input>
						-->
						<el-tree ref="tree" class="filter-tree w-filter-tree"  :filter-node-method="filterNode"
						   node-key="id"  :default-expanded-keys="expandIds" :data="treelist" :props="defaultProps" 
						    @node-click="handleNodeClick"></el-tree> <!-- [curTreeId]  -->
						 
					</div>
			  </div>
	    </div>
	    <div class="toggle">
			<div class="bar-con-l" @click="toggle_bar">
				<div class="bar"></div>
			</div>
		</div>
		
		<div class="right_side">
		  <div class="panel panel-default">
		  		<div class="panel-heading" id="panel-heading-div">
			  		<h3 class="panel-title">
						<i class="icon-user"></i>部门管理
					</h3>
				</div>
				
				<div class="panel-body w-pt5 w-jheight">	
					<el-col :span="12"  v-if="pName!=''" class="mt5">	
						[ 父部门：{{pName}} ]
					</el-col>
					<div class="w-tr" >
						<el-button type="primary"  v-if="right.edit" @click="mdfDept('edit')">编辑</el-button>
						<el-button type="primary"  v-if="right.add" @click="mdfDept('add')">添加</el-button>
						<el-button type="primary"  v-if="right.del" @click="mdfDept('del')">删除</el-button>
					</div>	
					<el-table :data="deptInfo" :show-header="show_header" border style="width: 100%">
		    			<el-table-column prop="name" label="名称">
		    			</el-table-column>
    					<el-table-column prop="value" label="取值">
		    			</el-table-column>		    			
   					</el-table>
				</div>
				
				<el-dialog class="w-dialogpd" :title="deptExec" width="600px" :visible.sync="deptForm" :close-on-click-modal="false" @close="close">
					   <p v-if="pName!=''&&exec=='edit'">
							[ 父部门名称：{{pName}} ]
					    </p> 
					    <p v-if="exec=='add'">
							[ 父部门名称：{{deptName}} ]
					    </p> 
					    <el-form ref="form" :rules="form.rules" :model="form" label-width="80px">
						  <el-form-item label="部门名称" prop="name">
						    <el-input v-model="form.name"></el-input>
						  </el-form-item>
						  <!-- 
						  <el-form-item label="参评" prop="kp">
						    <el-radio v-model="form.kp" label="1">是</el-radio>
						    <el-radio v-model="form.kp" label="0">否</el-radio>
						  </el-form-item>
						   -->
						  <!--  
						  <el-form-item label="任务数" prop="task">
						    <el-input v-model="form.task"></el-input>
						  </el-form-item>
						  -->
						  <el-form-item label="负责人" >
						    <el-input v-model="form.dname" readonly="true"></el-input>
						  </el-form-item>
						  
						  <el-form-item label="联系电话" >
						    <el-input v-model="form.dphone" readonly="true"></el-input>
						  </el-form-item>
						  
						  <el-form-item label="显示顺序" prop="order">
						    <el-input v-model="form.order"></el-input>
						  </el-form-item>
						  
						  <el-form-item label="部门描述" prop="desc">
						    <el-input type="textarea" v-model="form.desc"></el-input>
						  </el-form-item>
						  
						</el-form>
				 
					  <div slot="footer" class="dialog-footer mt-20">
					    <el-button @click="cancel">取 消</el-button>
					    <el-button type="primary" @click="save">确 定</el-button>
					  </div>
				</el-dialog>
				
		  </div>
		</div>
		
	</div>
	


</body>
<script>
	_import("../../plugin/vue/js/after.js");
	//_import("../../plugin/js/user.js");
</script>
<script>
	_import("js/dept.js");
	 var wHight = $(window).height()-50;
	var bHight = wHight + "px";
	$(".w-jheight").css("height",bHight); 
</script>
</html>